Remove registry preload and avoid updating sources prematurely instead
authorCarol (Nichols || Goulding) <carol.nichols@gmail.com>
Sat, 19 Sep 2015 20:13:55 +0000 (16:13 -0400)
committerCarol (Nichols || Goulding) <carol.nichols@gmail.com>
Sun, 20 Sep 2015 03:19:16 +0000 (23:19 -0400)
commitf3e69fdb1463a655fe3da2016a0b1b46c8841915
tree9c0adaa3ec426b8f73a4b50b75a0aee3d568bf43
parent70847d980d267277546481ead555c89f7e04e862
Remove registry preload and avoid updating sources prematurely instead

So registry preloading was added[1] to avoid updating the root path
multiple times unnecessarily, since that's an expensive operation. But
with Package::from_path, we can get the root package just from a
manifest and a config without having to update the whole path source.

So now we don't have to remember to preload the registry if we've
already updated a source and want to use the registry later. Instead, we
just avoid loading the source initially and let the registry do it when
it needs to -- which is now in resolve_with_previous.

This does cause one tested error message to happen slightly later than
it used to, but it still happens.

[1] - ef8c651af
src/cargo/core/registry.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_fetch.rs
src/cargo/ops/cargo_generate_lockfile.rs
src/cargo/ops/cargo_package.rs
src/cargo/ops/resolve.rs
tests/test_cargo_compile_path_deps.rs